#include <iostream>
using namespace std;
using ll=long long;
 
int main() {
    ll k;
    cin >> k;

    for (ll a = 1; a * a <= k; ++a) {
        if ((k - a) % (a + 1) == 0) {
            ll b = (k - a) / (a + 1);
            if (b > 0) {
                ll p = a + b;
                ll q = a * b;
                if (p + q == k) {
                    cout << p << " " << q << endl;
                    return 0;
                }
            }
        }
    }

    cout << -1 << endl;
    return 0;
}
